package com.kaoshi.servefw.domain;


import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.joda.time.DateTime;
import org.joda.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * @TableName stables
 */
@TableName(value ="stables")
@Data
public class Stables   implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    @ExcelProperty(value = "主键")
    private Integer id;
    @ExcelProperty(value = "编号")
    private String number;
    @ExcelProperty(value = "服务机构外键")
    private Integer ageid;
    @ExcelProperty(value = "服务团队外键")
    private Integer tid;
    @ExcelProperty(value = "服务医生外键")
    private Integer did;

    @ExcelIgnore
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date shours;
    @ExcelProperty(value = "服务包外键")
    private Integer pid;
    @ExcelProperty(value = "服务项目")
    private String project;
    @ExcelProperty(value = "服务地点外键")
    private Integer aid;
    @ExcelProperty(value = "服务备注")
    private String notes;
    @ExcelProperty(value = "服务状态")
    private Integer status;
    @ExcelProperty(value = "驳回原因")
    private String overrule;
    @ExcelProperty(value = "取消原因")
    private String cancel;

    @ExcelIgnore
    private Date booking;

    @ExcelIgnore
    private Date submi;

    @ExcelIgnore
    private Date audit;

    @ExcelIgnore
    private Date finish;
    @ExcelProperty(value = "审核人")
    private String reviewers;

    @ExcelIgnore
    private Date lifted;
    @ExcelProperty(value = "居民外键")
    private Integer dewid;
    @ExcelIgnore
    private Integer isdel;
    @ExcelProperty(value = "服务来源外键")
    private Integer sid;
    @ExcelProperty(value = "访问信息外键")
    private Integer hid;


    @TableField(exist = false)
    @ExcelIgnore
    private String aname;
    @TableField(exist = false)
    @ExcelIgnore
    private String agename;
    @TableField(exist = false)
    @ExcelIgnore
    private String dname;
    @TableField(exist = false)
    @ExcelIgnore
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    private Date birthday;
    @TableField(exist = false)
    @ExcelIgnore
    private String dewname;
    @TableField(exist = false)
    @ExcelIgnore
    private String tname;
    @TableField(exist = false)
    @ExcelIgnore
    private String pname;
    @TableField(exist = false)
    @ExcelIgnore
    private Date start;
    @TableField(exist = false)
    @ExcelIgnore
    private Date end;
    @TableField(exist = false)
    @ExcelIgnore
    private String identity;
    @TableField(exist = false)
    @ExcelIgnore
    private String phone;
    @TableField(exist = false)
    @ApiModelProperty(value = "现居地")
    @ExcelIgnore
    private String current;
    @TableField(exist = false)
    @ExcelIgnore
    private String sname;
    @TableField(exist = false)
    @ExcelIgnore
    @ApiModelProperty(value = "年龄")
    private Integer age;

    @TableField(exist = false)
    @ExcelIgnore
    private Integer sex;
    @TableField(exist = false)
    @ExcelIgnore
    private String label;
    @TableField(exist = false)
    @ExcelIgnore
    private String blood;

    @TableField(exist = false)
    @ExcelIgnore
    private Integer fage;

    @TableField(exist = false)
    @ExcelIgnore
    private Integer fsex;

    @TableField(exist = false)
    @ExcelIgnore
    private String gx;

    @TableField(exist = false)
    @ExcelIgnore
    private String member;

    @TableField(exist = false)
    @ExcelIgnore
    private String fasting;

    @TableField(exist = false)
    @ExcelIgnore
    private String heart;

    @TableField(exist = false)
    @ExcelIgnore
    private String description;

    @TableField(exist = false)
    @ExcelIgnore
    private String guide;
    @TableField(exist = false)
    @ExcelIgnore
    private String mname;



    private static final long serialVersionUID = 1L;


    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Stables other = (Stables) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getNumber() == null ? other.getNumber() == null : this.getNumber().equals(other.getNumber()))
            && (this.getAgeid() == null ? other.getAgeid() == null : this.getAgeid().equals(other.getAgeid()))
            && (this.getTid() == null ? other.getTid() == null : this.getTid().equals(other.getTid()))
            && (this.getDid() == null ? other.getDid() == null : this.getDid().equals(other.getDid()))
            && (this.getShours() == null ? other.getShours() == null : this.getShours().equals(other.getShours()))
            && (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
            && (this.getProject() == null ? other.getProject() == null : this.getProject().equals(other.getProject()))
            && (this.getAid() == null ? other.getAid() == null : this.getAid().equals(other.getAid()))
            && (this.getNotes() == null ? other.getNotes() == null : this.getNotes().equals(other.getNotes()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getOverrule() == null ? other.getOverrule() == null : this.getOverrule().equals(other.getOverrule()))
            && (this.getCancel() == null ? other.getCancel() == null : this.getCancel().equals(other.getCancel()))
            && (this.getBooking() == null ? other.getBooking() == null : this.getBooking().equals(other.getBooking()))
            && (this.getSubmi() == null ? other.getSubmi() == null : this.getSubmi().equals(other.getSubmi()))
            && (this.getAudit() == null ? other.getAudit() == null : this.getAudit().equals(other.getAudit()))
            && (this.getFinish() == null ? other.getFinish() == null : this.getFinish().equals(other.getFinish()))
            && (this.getReviewers() == null ? other.getReviewers() == null : this.getReviewers().equals(other.getReviewers()))
            && (this.getLifted() == null ? other.getLifted() == null : this.getLifted().equals(other.getLifted()))
            && (this.getDewid() == null ? other.getDewid() == null : this.getDewid().equals(other.getDewid()))
            && (this.getIsdel() == null ? other.getIsdel() == null : this.getIsdel().equals(other.getIsdel()));

    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getNumber() == null) ? 0 : getNumber().hashCode());
        result = prime * result + ((getAgeid() == null) ? 0 : getAgeid().hashCode());
        result = prime * result + ((getTid() == null) ? 0 : getTid().hashCode());
        result = prime * result + ((getDid() == null) ? 0 : getDid().hashCode());
        result = prime * result + ((getShours() == null) ? 0 : getShours().hashCode());
        result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
        result = prime * result + ((getProject() == null) ? 0 : getProject().hashCode());
        result = prime * result + ((getAid() == null) ? 0 : getAid().hashCode());
        result = prime * result + ((getNotes() == null) ? 0 : getNotes().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getOverrule() == null) ? 0 : getOverrule().hashCode());
        result = prime * result + ((getCancel() == null) ? 0 : getCancel().hashCode());
        result = prime * result + ((getBooking() == null) ? 0 : getBooking().hashCode());
        result = prime * result + ((getSubmi() == null) ? 0 : getSubmi().hashCode());
        result = prime * result + ((getAudit() == null) ? 0 : getAudit().hashCode());
        result = prime * result + ((getFinish() == null) ? 0 : getFinish().hashCode());
        result = prime * result + ((getReviewers() == null) ? 0 : getReviewers().hashCode());
        result = prime * result + ((getLifted() == null) ? 0 : getLifted().hashCode());
        result = prime * result + ((getDewid() == null) ? 0 : getDewid().hashCode());
        result = prime * result + ((getIsdel() == null) ? 0 : getIsdel().hashCode());

        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", number=").append(number);
        sb.append(", ageid=").append(ageid);
        sb.append(", tid=").append(tid);
        sb.append(", did=").append(did);
        sb.append(", shours=").append(shours);
        sb.append(", pid=").append(pid);
        sb.append(", project=").append(project);
        sb.append(", aid=").append(aid);
        sb.append(", notes=").append(notes);
        sb.append(", status=").append(status);
        sb.append(", overrule=").append(overrule);
        sb.append(", cancel=").append(cancel);
        sb.append(", booking=").append(booking);
        sb.append(", submi=").append(submi);
        sb.append(", audit=").append(audit);
        sb.append(", finish=").append(finish);
        sb.append(", reviewers=").append(reviewers);
        sb.append(", lifted=").append(lifted);
        sb.append(", dewid=").append(dewid);
        sb.append(", isdel=").append(isdel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
